$OpenBSD: patch-configure_ac,v 1.46 2017/04/07 21:32:20 sthen Exp $

c-client requires both kerbV libs *and* (separately) libssl.

--- configure.ac.orig	Fri Apr  7 16:49:39 2017
+++ configure.ac	Fri Apr  7 21:42:55 2017
@@ -60,7 +60,7 @@ AC_SUBST([astvarrundir],      ['${localstatedir}/run/a
 
 case "${host_os}" in
      *bsd*)
-     if test ${prefix} = 'NONE'; then
+     if test ${prefix} != 'NONE'; then
         astvarlibdir='${prefix}/share/asterisk'
         astdbdir='${localstatedir}/db/asterisk'
      fi
@@ -1938,7 +1938,7 @@ if test "${USE_IMAP_TK}" != "no"; then
 			)
 		else #looking in imap directory didn't work, try c-client
 			imap_ldflags=""
-			imap_libs="-lc-client"
+			imap_libs="-lcrypto -lssl -lc-client"
 			imap_include="-DUSE_SYSTEM_CCLIENT"
 			CPPFLAGS="${saved_cppflags}"
 			LIBS="${saved_libs}"
@@ -2124,7 +2124,7 @@ AST_EXT_TOOL_CHECK([NETSNMP], [net-snmp-config], , [--
 
 AST_EXT_LIB_CHECK([NEWT], [newt], [newtBell], [newt.h])
 
-AST_EXT_LIB_CHECK([UNIXODBC], [odbc], [SQLConnect], [sql.h], [])
+AST_EXT_LIB_CHECK([UNIXODBC], [iodbc], [SQLConnect], [sql.h], [-lpthread])
 
 AST_EXT_LIB_CHECK([OGG], [ogg], [ogg_sync_init], [])
 
